import request from "@/utils/request";

/**
 * 获取项目类型字典值
 */
export function getProjectType() {
    return request({
        url: '/system/dict/data/type/ctba_project_type',
        method: 'get',
    });
}

/**
 * 查询用户自己的项目
 */
export function getProjects(query) {
    return request({
        url: '/core/project/front/list',
        method: 'get',
        params: query
    });
}
/**
 * 修改工程
 */
export function updateProject(data) {
    return request({
        url: '/core/project',
        method: 'put',
        data: data
    });
}
/**
 * 删除工程
 */
export function delProject(id) {
    return request({
        url: '/core/project/' + id,
        method: 'delete'
    });
}
/**
 * 新增工程
 */
export function addProject(data) {
    return request({
        url: '/core/project/front',
        method: 'post',
        data: data
    });
}
/**
 * 查询工程详细
 */
export const getProject = (id) => {
    return request({
        url: '/core/project/front/' + id,
        method: 'get'
    });
};